#include <QToolButton>
#include <QGridLayout>

#include "UMLPalette.h"

UMLPalette::UMLPalette(QWidget *parent)
	: QWidget(parent)
{
	QToolButton *btnClassBox = new QToolButton();
	QToolButton *btnAbstractClassBox = new QToolButton();
	QToolButton *btnGenericClass = new QToolButton();

	QToolButton *btnExt = new QToolButton();
	QToolButton *btnImpl = new QToolButton();
	QToolButton *btnAssn = new QToolButton();
	QToolButton *btnAggr = new QToolButton();
	QToolButton *btnComp = new QToolButton();

	QToolButton *btnBall = new QToolButton();
	QToolButton *btnSocket = new QToolButton();
	QToolButton *btnBNS = new QToolButton();

	/* setup buttons */
	btnClassBox->setCheckable(true);
	btnClassBox->setIcon(QIcon("concrete.xpm"));

	QGridLayout *layout = new QGridLayout;
	layout->addWidget(btnClassBox, 0, 0);
	layout->addWidget(btnAbstractClassBox, 0, 1);
	layout->addWidget(btnGenericClass, 0, 2);
	layout->addWidget(btnExt, 1, 0);
	layout->addWidget(btnImpl, 1, 1);
	layout->addWidget(btnAssn, 1, 2);
	layout->addWidget(btnAggr, 1, 3);
	layout->addWidget(btnComp, 1, 4);
	layout->addWidget(btnBall, 2, 0);
	layout->addWidget(btnSocket, 2, 1);
	layout->addWidget(btnBNS, 2, 2);
	setLayout(layout);

	setMaximumHeight(sizeHint().height());
}

